import http from "@/utils/http";
/**
 * 添加收货地址
 */
export const postMemberAddress = (data) => {
    return http({
        url: "/member/address",
        method: "post",
        data,
    });
};

/**
 * 获取收货地址列表
 */
export const getMemberAddress = () => {
    return http({
        url: "/member/address",
    });
};

//
// DELETE
// /member/order
/**
 *  删除地址
 */
export const DelMemberOrder = (id) => {
    return http({
        url: `/member/address/${id}`,
        method: "DELETE",

    });
};


// 更新收货地址
// PUT
//     / member / address / { id }
/**
 *  查询收货地址详情
 */
export const GetMemberOrder = (id) => {
    return http({
        url: `/member/address/${id}`,

    });
};

/**
 *  更新收货地址
 */
export const putMembeAddress = (id, data) => {
    return http({ url: `/member/address/${id}`, method: "put", data });
};